
package com.zsrt.day20170504.ch06;

import java.io.IOException;

public class SleepThread extends Thread{

	@Override
	public void run() {
		
		try {
			Thread.sleep(1*1000*60);
		} catch (InterruptedException e) {
			System.out.println("Just Five Minutes");
		}
		System.out.println("run()执行完毕");
	}
	
	public static void main(String[] args) throws IOException {
		Thread thread= new SleepThread();
		thread.start();
		System.out.println("线程将被挂起1分钟，请按回车键唤醒该线程");
		System.in.read();
		//唤醒线程
		thread.interrupt();
		System.out.println("///////////////////////");
	}
}
